import {defineStore} from "pinia";
import {boardType} from "@/app/setting/types/board-type";

export default defineStore({
    id: 'setting',
    state: () => ({
        localSetting: localStorage.getItem("localSetting") || {},
        selectedKeys: ["GeneralSetting"] as boardType[],
        openKeys: ["general"] as string[]
    }),
    getters: {},
    actions: {
        setSelectedKeys(name: boardType) {
            this.selectedKeys = [name]
        },
        setOpenKeys(name: string) {
            this.openKeys = [name]
        }
    }
})